package com.googlecode.microanalyst.designer.model.commands;

import com.googlecode.microanalyst.designer.model.AnalysisConnectionBendpoint;

public class CreateBendpointCommand extends BendpointCommand {

	public void execute() {
		AnalysisConnectionBendpoint wbp = new AnalysisConnectionBendpoint();
		wbp.setRelativeDimensions(getFirstRelativeDimension(),
				getSecondRelativeDimension());
		getConnection().insertBendpoint(getIndex(), wbp);
		super.execute();
	}

	public void undo() {
		super.undo();
		getConnection().removeBendpoint(getIndex());
	}

}
